package com.leyou.user.api;

import com.leyou.user.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * description: 用户相关Api
 * @author 朱正磊
 * @date 2021-04-18 13:32:58
 */
@Component
@FeignClient("user-service")
public interface UserApi {

    /**
     * description: 根据用户名和密码查询用户
     * @author 朱正磊
     * @date 2021-04-17 17:01:28
     * @param username 用户名
     * @param password 密码
     * @return 返回用户信息
     */
    @GetMapping("query")
    User queryUserByUsernameAndPassword(@RequestParam("username") String username, @RequestParam("password") String password);

}
